SPORTSTER 14,400 CHAPTER 4. INTERFACE CONTROLS Use the commands explained in this chapter to select modem settings at the serial port and phone line interfaces. The operations affected include flow and error control, data rate shifting, and data compression. TERMINOLOGY ARQ (automatic repeat request, or retransmission) is the term used by USRobotics in error control commands and response codes. An ARQ connection indicates a call under error control. The serial port rate is the rate at which the Sportster 14,400 communicates with its attached terminal (at the serial port interface). Terminal refers to the machine (terminal or personal computer) to which the Sportster 14,400 is attached. The connection rate is the rate at which the Sportster 14,400 communicates with remote modems over a phone link. MODEM INTERFACES Figure 4.1 shows which commands control modem operations at the serial port and phone line interfaces. Serial Port Interface Phone Line Interface Serial port rate: &Bn CCITT/Bell answer sequence: Bn Flow control Connection rate: &Nn Transmit Data: &Hn Error control (ARQ): &Mn Received Data: &Rn, &In Data Compression: &Kn DSR override: &Sn Figure 4.1_Interface Control Commands Detailed command descriptions are in this chapter. If you're familiar with modem operations, you may want to review Chapter 3, Quick Start, and then use this chapter for reference. CHANGING SETTINGS When you change a setting, the modem retains it until you do one of the following. ù Change the setting again. ù Issue the ATZ command to reset the modem. If DIP switch 7 is UP, the modem resets to the defaults stored in nonvolatile memory (NVRAM). If DIP switch 7 is DOWN, the modem resets to the factory settings permanently stored in read-only memory (ROM). ù Issue the AT&F command to reset the modem to its factory settings. ù Turn the modem off and power it on again. The modem loads either the nonvolatile memory defaults (DIP switch 7 UP) or the factory settings (DIP switch 7 DOWN). THROUGHPUT GUIDELINES The following guidelines should help you to make the most of your modem's advanced performance features. In many instances, experimentation and experience will indicate what works best for your applications. Throughput is the volume of user information transferred per second, without Start and Stop bits and other overhead information. You'll obtain optimal throughput under the following conditions. 1.Your communications software supports a fixed serial port rate higher than the connection rate, for example, setting your software to lock into the 38.4K bps rate, and setting the modem to &B1. Check the quick configuration guide that came with the modem or your software manual, and see Data Rate Commands in this chapter. See Recommended Settings and Alternative Settings in Chapter 3 for quick-start guidelines. 2.The call is under data compression. See Data Compression (&Kn) in this chapter. 3.You're transmitting text files. Throughput is higher for text files than other types of files, such as .EXE or .COM binary files. For a comparative table, see the end of Appendix A. 4.File transfer may be slowed down by a file-transfer protocol. Many non- text files require a file-transfer protocol, but throughput results vary. Certain public domain file- transfer protocols, for example, have the following effects. KermitWith the basic Kermit, throughput is severely reduced due to short block lengths (under 128 bytes) and acknowledgment turnaround time. Later enhancements to Kermit permit larger data block lengths. XmodemThroughput may be reduced if your version uses short block lengths, for example 128 bytes. Some versions use blocks of 1 Kbyte, which is much better, although overhead (error-control protocol information) still affects overall throughput. YmodemThis protocol is similar to Xmodem with 1-Kbyte block lengths, and allows multiple files to be sent in one transfer. The above protocols further reduce throughput during error-control (ARQ) connections. The accuracy of the data is checked twice, by the file- transfer protocol and the modem. To avoid redundancy, disable modem error control by setting the modem to &M0. For better throughput, we recommend Ymodem-G, with the modem left at its error-control default, &M4. Ymodem-G assumes the modems are handling error control: overhead is minimal, with throughput almost equal to that obtained with no file-transfer protocol. However, keep in mind that Ymodem-G is only useful if the modems are using error control. In addition, follow this recommendation only if your machine and software support hardware flow control. On the other hand, the most current version of Zmodem can yield even greater efficiency. Leave the modem at its error-control default (&M4) and data compression default, &K1. Zmodem performs the same kind of com pression as V.42 bis; it turns off its compression if files are already compressed. WARNING: If you are using an X-, Y- or Zmodem-type protocol, do not use the modem's software flow control. See the more detailed warning in this chapter under Warning on Software Flow Control. CCITT/BELL SETTINGS (BN) B0 The CCITT answer sequence. This setting is the default and is required for the modem to answer V.32 and V.32 bis calls. This setting is also used to answer all calls from overseas, but does not affect U.S./ Canada calls. It takes slightly longer to connect at 2400 bps and below, however. B1 The Bell answer tone, commonly used in the U.S. and Canada for 300/1200/2400 bps connections. If you're only using the modem to call or answer 2400-bps or slower modems, the Sportster 14,400 will make connec-tions more quickly at this setting. Keep in mind, however, that a modem set to B1 can't answer V.32 or V.32 bis calls. ERROR CONTROL (&MN) The Sportster 14,400 first attempts a connection using V.42 (LAPM) error control and, if that doesn't succeed, it attempts an MNP connection. If that doesn't succeed, the modem tries to connect without error control. (The process takes much less time than it takes to read this paragraph.) Error control is possible at rates of 1200 bps and above. For background information, see Appendix A. The following options are available. &M0Normal mode, no error control. Because of the nature of phone-line channels, this is never recommended for calls above 2400 bps unless you're using an error-correcting file-transfer protocol. &M1Reserved. &M2Reserved. &M3Reserved. &M4Normal/ARQ mode. This setting is the default. If the remote modem doesn't recognize the Sportster 14,400's error-control signals_V.42 or MNP_the modem operates in Normal mode, as though it were set to &M0. &M5ARQ mode. If the remote modem doesn't recognize the error-control request_V.42 or MNP_the Sportster 14,400 hangs up. Auto Answer with Error Control When set to &M4 or &M5 and a call comes in, the modem goes off hook and responds to received error-control signals. If the Sportster 14,400 doesn't receive those signals and is set to Normal/ARQ mode (&M4), it answers the call in Nor mal mode (&M0). If it doesn't receive the signals and is set to ARQ mode (&M5), it hangs up. ONLINE FALLBACK AND FALL FORWARD When online at 14.4K bps under error control, V.32 bis modems monitor the condition of the phone line. If they sense disturbances that threaten data in tegrity, they fall back and retrain (resynchronize) at the less vulnerable speed of 12,000 bps. If conditions remain poor, the modems continue to fall back to the next lower speed. As line improvements occur, they fall forward to the next higher speed, up to the link rate of the call. Without online fallback, disturbances on the line could cause the modems to hang up from a high-speed connection. The error-control protocols have a retry timeout (a maximum of 12 re transmissions) after which the modems hang up. Falling back to keeps the modems online to complete the call. See Online Fallback/Fall Forward in Appendix A for more information. FLOW CONTROL OVERVIEW This feature controls the flow of data into and out of the modem's Transmit and Received Data buffers. Due to varia tions in terminal and communications software features, the Sportster 14,400 is shipped with all flow control options disabled. NOTE: Flow control of data from the terminal to the modem is required under the circumstances described under Transmit Data Flow Control (&Hn), later in this chapter. Flow control of data received over the phone link is not as critical unless, for example, you are writing incoming files to disk on a very slow computer. Transmit Data Buffer Sizes The size of the Transmit Data buffer depends on whether the connection is under error control or not, as follows. ù ARQ connections: 3.25 Kbytes. ù Non-ARQ connections: 1.5 Kbytes. This allows the use of error- control file-transfer protocols such as Xmodem and Ymodem without flow control. Received Data Buffer Size The size of this buffer remains constant at 2 Kbytes. Hardware/Software Flow Control Options The modem uses either hardware or software flow control to manage the amount of data stored in the buffers, to prevent buffer overflow. For the reasons described in the next section, we recommend hardware flow control. This type of flow control is performed between the modem and terminal with RS-232 signaling. Software flow control uses the standard ASCII Transmit OFF (XOFF) character, -S, and the Transmit ON (XON) character, -Q. ASCII definitions are as follows. XON -Q ASCII 17 Decimal, 11 Hex XOFF -S ASCII 19 Decimal, 13 Hex The ASCII definitions of these characters may be user-defined; see Registers S22 and S23 in Appendix B. That appendix also includes an ASCII chart. NOTE: Both your software and terminal must support the type of flow control you select. Many terminals, and computers that are 100% IBM PC- compatible, support hardware flow control. Apple computers, however, do not. If you're using software that is included in the quick configuration guide, refer to that document to see what your software supports. Otherwise, see your software documentation. Warning on Software Flow Control In ordinary operations, the only characters the modem recognizes during a call are the three pluses (+++) of the escape code that returns it to command mode. But when software flow control is enabled, the modem or terminal (receiving device) also looks for - S or -Q characters. If these characters occur in a file or as part of a protocol, the device reads them as XON/ XOFF characters and acts on them. For example, XON/XOFF characters occur in binary files, and are used by Xmodem- type protocols. They may also come from the remote system: an XON from the remote system, after your modem has sent an XOFF, can result in buffer overflow. We recommend the following settings. 1.If possible, always use hardware flow control. Software flow control may prove satisfactory if you're only transferring text files; however, you may lose data if XON/ XOFF characters occur in the data stream from other sources. 2.If your equipment doesn't support hardware flow control and you are performing Xmodem-type protocol or bi nary file transfers, set the modem to the following factory defaults. a.&H0, to disable flow control entirely. b.&B0, so that the serial port rate switches to match the connection rate. c.&N0, to enable the variable connection rate. We also recommend that you select a protocol that performs error correction, and turn off the modem's error control, that is, set it to &M0. TRANSMIT DATA FLOW CONTROL (&HN) This type of flow control regulates data your terminal transmits to the modem for transmission over the phone link. The modem monitors its Transmit Data buffer as data comes in. If the buffer approaches 90% capacity, the modem signals the terminal to stop transmitting. When the modem has sent enough data over the link to half-empty the buffer, it signals the terminal to resume transmitting. When it is Required Transmit Data flow control should be enabled in the following situations. ù You're using error control (any allowable rate above 300 bps), with or without data compression. If data blocks must be sent again due to errors, a continuous stream of data from the terminal could overflow the modem's buffer. ù The serial port rate is higher than the connection rate, for example, the serial port rate is 38.4K bps and the connection rate is 14.4K bps. Another example is a serial port rate of 19.2K bps and a connection rate of 2400 bps. NOTE: You may have to set your software as well to either hardware or software flow control. Some programs also require that you turn off the type you are not using. &H0Transmit Data flow control disabled. Default. &H1Hardware flow control. Recommended setting. Requires that your terminal and software support Clear to Send (CTS). The modem drops the Clear to Send (CTS) signal to the terminal when the modem's buffer nears 90% capacity, and starts sending CTS again when the buffer is about half full. &H2Software flow control. Requires that your software support XON/XOFF signaling. The modem sends an XOFF to the terminal when its buffer nears 90% capacity, and sends an XON when the buffer is about half full. &H3Use both hardware and software flow control. Select this option if you're not sure what your terminal supports. NOTE: If possible, always use hardware flow control. For a detailed explanation, see the Warning on Software Flow Control, earlier in this chapter. RECEIVED DATA FLOW CONTROL Separate commands, &Rn (hardware) and &In (software), control the flow of Received Data passed by the Sportster 14,400 to your terminal. Because computers handle incoming data at a much faster rate than the modem receives it over the phone line, most users won't need this type of flow control. Both your terminal and software must support the type of Received Data flow control you select. Review the quick configuration guide and, if necessary, your software and computer manuals. We recommend hardware flow control, if possible. See the Flow Control Overview and Warning on Software Flow Control earlier in this chapter. Hardware Control (&Rn) When your terminal drops its Request to Send (RTS) signal, the modem stops passing along received data. The terminal sends RTS again when it is ready to receive more data. Your terminal and software must support RTS. You cannot use this type of flow control, however, if your software requires a constant RTS signal. NOTE: Use this type of flow control only for ARQ (error-control) calls, because the V.42 and MNP protocols control the flow of data across the phone link. During non-ARQ connections, however, there is no way to signal the remote modem to stop sending data. If your modem stops passing data to your terminal and the remote modem keeps sending across the link, the Received Data buffer will overflow. &R0Reserved. &R1The modem ignores Request to Send (RTS). Default. This setting is required if your software does not support RTS. &R2Hardware flow control of received data enabled. The modem passes received data to your terminal only on receipt of the RTS signal. Software Control (&In) When you send the modem a -S (XOFF) command from the keyboard, the modem stops passing received data to your terminal. (Hold down the Ctrl key and press the letter. Don't type the angle brackets.) When you send a - Q (XON) command, the modem resumes. NOTE: Because of the risk of data loss, all of the options that follow, except &I0, are only recommended if your data does not include XON/XOFF control characters. For a more detailed ex planation, see Warning on Software Flow Control earlier in this chapter. &I0Disables XON/XOFF flow control of received data. Default. Recommended for non-ARQ (Normal mode) calls. &I1The Sportster 14,400 acts on your typed XON/XOFF commands, and passes them to the remote computer. This is not recommended for non-ARQ calls. Use in ARQ mode only, but keep in mind that the XON/ XOFF characters sent to the remote computer may interfere with XON/ XOFF signaling between the remote computer and remote modem. &I2 is the preferred option for ARQ calls. &I2The Sportster 14,400 acts on your XON/XOFF commands, but removes them from the data stream instead of passing them to the remote computer. This is the recommended setting for ARQ mode, only. It ensures that the remote computer does not confuse your XON/XOFF char acters with those from its attached modem. If the call is not in ARQ mode, there is no flow control on the phone link. If you send an XOFF to your modem and it stops passing data, it has no way to tell the remote computer and modem to stop sending for a while, and your modem's buffer may overflow. DATA COMPRESSION (&KN) When data compression is enabled, the transmitting modem detects redundant units of data and recodes them into shorter units of fewer bits. The receiving modem decompresses the redun dant data units before passing them to the receiving computer. Compression does not occur unless the modems are able to establish an error- control connection. In addition, your modem should be set for Transmit Data flow control (&H1, 2 or 3), as described earlier in this chapter. If the modem makes a V.42 connection, it negotiates V.42 bis compression. If V.42 bis is not feasible, the connection remains under error control, but without data compression. If the Sportster 14,400 makes an MNP connection, it negotiates for MNP Level 5 (MNP5) data compression. If the remote modem does not have MNP5 capability, the connection remains under MNP error control, but without compression. &K0Data compression disabled. &K1Auto enable/disable. This is the default. The modem enables compression if the serial port rate is fixed, &B1, and disables compression if the serial port rate follows the connection rate, &B0. The reason is that compression of fers no throughput advantage when the serial port and connection rates are equal: compression may even degrade throughput. &K2Data compression enabled. Use this setting to keep the modem from disabling compression. &K3Selective data compression. The modem negotiates only for V.42 bis compression, and disables MNP Level 5 (MNP5) compression. See the following note. NOTE: MNP5 compression is not useful when transferring files that are already compressed, such as the .ZIP files downloaded from many Bulletin Boards, and 8-bit binary files, which appear to the modem to be already compressed. MNP5 tends to add data to these files, and throughput over the phone link degrades. V.42 bis compression dynamically detects when data is already compressed and turns off until it detects that compres sion will work to advantage. The special &K3 setting enables the best throughput for already-compressed files and 8-bit binary files. See Throughput Guidelines and Data Compression in Appendix A for more information, including throughput to expect for different kinds of files. DATA RATE COMMANDS The &Bn and &Nn commands allow you to select variable or fixed data rates at the serial port and phone line (modem-to- modem) interfaces. Throughout this manual we recommend that, if your software allows, you select a fixed rate at the serial port interface (&B1) so that the serial port rate can remain higher than the rate on the phone link. You'll get greater throughput regardless of the connection rate. Just remember to also enable Transmit Data flow control, preferably hardware (&H1). For the phone line interface we recommend variable rates (&N0). This enables the modem to switch its connection rate to match the rate of a remote modem, no matter what the remote modem's rate is. If the connection rate is fixed, for example at 9600 bps (&N6), the modem only connects with modems operating at that rate. Of course, if your application requires connections with modems at only one rate, you may wish to set the modem to a fixed connection rate. Software Requirements Both variable and fixed serial port rates require communications software support. Most communications programs support variable rates. Not all software supports a fixed serial port rate independent of the connection rate, although this support is in creasing in program updates. Check the quick configuration guide and/or your software manual, especially if your software is a later version than the version in the quick configuration guide. Serial Port Rate Select (&Bn) Use this command to select variable or fixed rates at the serial port interface. Initially, the modem's rate depends on your software setting. The modem detects this rate from the rate at which it receives the AT command. After that, the modem's serial port rate depends on the modem's &B setting, as follows. &B0Variable serial port rates. Default. The modem switches its serial port rate to follow the connection rate it establishes with a remote modem. The software also switches its serial port rate to match the connection rate. If your software has an Auto Baud Detect feature, turn it on. &B1Fixed serial port rate. The modem detects its serial port rate from your last AT command, and maintains that rate regardless of the connection rate. For the greatest throughput, set your software to 57.6K or 38.4K bps first, and then set the modem to &B1. The serial port rate must be equal to or higher than the connection rate. In addition, this setting requires Transmit Data flow con trol, preferably hardware control (&H1), so that the modem's buffer doesn't overflow. Some programs require that you turn off Auto Baud Detect to fix the serial port rate. Others use the term Serial Port Lock (yes or no). &B2Fixed for ARQ calls/Variable for non- ARQ calls, Answer mode only. When the modem goes off hook and answers in ARQ mode, it shifts its serial port rate up to the rate you've written to NVRAM, for example, 38.4K bps. If the connection is not under error control, the modem behaves as if it were set to &B0 when it answers, and switches its serial port rate to match the connection rate of each call. This option is designed for installations such as Bulletin Boards that receive calls from a wide variety of modems, ranging from the very slow to those with the Sportster 14,400's advanced design. Connection Rate Select (&Nn) Use this command to select variable or fixed rates at the phone line interface. Variable rates allow the modem to con nect with a variety of remote modems, while fixed rates limit calls to a single connection rate. &N0Variable rates. Default. The Sportster 14,400 negotiates with the remote modem for the highest possible connection rate, depending on the capabilities of the remote modem. This is the recommended setting. &N Fixed rate. The Sportster 14,400 only connects if the 1O6remote modem is operating at the same rate. If not, the Sportster 14,400 hangs up. The fixed rate options are as follows. &N1 300 bps &N2 1200 bps &N3 2400 bps &N4 4800 bps &N5 7200 bps &N6 9600 bps &N7 12K bps &N8 14.4K bps By fixing the connection rate, you can filter out calls at other than a specific rate, for security or other reasons. DATA SET READY (&SN) The modem sends your terminal a Data Set Ready (DSR) signal. (Data Set is industry jargon for modem.) Few, if any, commercial communications programs require the modem to control DSR, &S1. Leave the modem set for DSR overridden, &S0, unless you know that your installation requires a different setting. &S0DSR is always ON (override). Default. &S1In Originate mode, the modem sends DSR after dialing, when it detects the remote modem's answer tone. In Answer mode, the modem sends DSR after it sends an answer tone. BREAK HANDLING (&YN) This command allows you to send a break to abort data transfer without disconnecting from the phone line interface. The following options are available. &Y0Destructive, no Break transmitted: the modem clears the data from its transmit buffer (all data is lost) but does not transmit the Break to the remote modem. &Y1Destructive, expedited: the modem clears the buffer and immediately sends a Break to the remote modem. Default. &Y2Nondestructive, expedited: the modem retains data in the transmit buffer, but immediately sends a Break to the remote modem. &Y3Nondestructive, unexpedited (send Break in sequence): the modem transmits any buffer data received before the Break, sends the Break, and then sends any subsequent input from the terminal. NOTE: If the call is under MNP5 data compression, destructive Breaks cause both modems to reset their data compres sion tables. When transmission resumes, the modems build new tables, and the result is lower than normal throughput.